package com.vip.seata.at.business.tcc.action;

import io.seata.rm.tcc.api.BusinessActionContext;

public interface StockAction {

    /**
     * 执行资源检查及预留操作
     */
    Object minusStock(BusinessActionContext context,String userId, String code, Long count) throws Exception;

    /**
     * 全局事物进行提交
     */
    boolean commit(BusinessActionContext actionContext) throws Exception;

    /**
     * 全局事务进行回滚
     */
    boolean cancel(BusinessActionContext actionContext) throws Exception;
}
